package com.spcmg.config;

import com.spcmg.utils.MyIdGenerator;
import com.spcmg.utils.SequenceIdGenerator;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@MapperScan({"com.spcmg.mapper"})
public class MybatisPlusConfig {

    @Bean
    public SequenceIdGenerator sequenceIdGenerator() {
        return new SequenceIdGenerator(10, 1);
    }

    @Bean
    public MyIdGenerator myIdGenerator(SequenceIdGenerator sequenceIdGenerator) {
        return new MyIdGenerator(sequenceIdGenerator);
    }
}
